home *** CD-ROM | disk | FTP | other *** search
- /* stpcpy.c From TC Bible page 273 Use stpcpy to copy one string to
- another. It behanves just like strcpy but the return values are
- different */
-
- #include <stdio.h>
- #include <string.h>
- main()
- {
- char str1[80], str2[80];
- printf("Enter a string: ");
- gets(str2);
- stpcpy(str1,str2);
- printf("String copied. Result is: %s\n", str1);
- }
-